<%= grid(@sheets) do |g|
    g.action_column  object_property: :id
    g.column name: 'ID', attribute: 'id'
    g.column name: '文件名', attribute: 'name' do |sheet|
     sheet.name
    end
    g.column name: '用户数量', attribute: 'users_count' 
    g.column name: '创建者', attribute: 'creator_id' do |sheet|
      name_tag sheet.creator
    end
    g.column name: '备注', attribute: 'remark' do |sheet|
        sheet.remark
    end

     g.column name: '导入',attribute: 'imported' do |sheet|
        sheet.imported ? "已导入" : link_to('导入', import_sheet_path(sheet), method: :post) 
    end

    g.column do |sheet|
        link_to '删除', sheet, method: :delete, data: { confirm: 'Are you sure?' }
    end
end %>